// storePackage/pages/latestNews/latestNews.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        likeStatus: 0,
        newsStatus: 0,
        iconTwo: '/img/common/dzno_icon.png',
        iconThree: '/img/common/dzyes_icon.png',
        titleList: [
            {
                name: '最新动态',
                id: 0
            },
            {
                name: '资讯专区',
                id: 1
            }
        ],
        dataList: [
            {
                name: '壹家壹看康养',
                id: 1,
                likeStatus: 0,
                pic: 'https://imgs.schzh.com/cover/1633948703976286787.jpg',
                date: '前三天',
                iconOne: '/img/common/cts_icon.png',
                iconTwo: '/img/common/dzno_icon.png',
                iconThree: '/img/common/dzyes_icon.png',
                message: 333,
                like: 333
            },
            {
                name: '阴芝',
                id: 2,
                likeStatus: 1,
                text: '央媒痛批“高房价”，国家出手解决住房问难题？刚需们有福了！国家大力发展住房租贷多少会有点影无…',
                date: '前三天',
                iconOne: '/img/common/cts_icon.png',
                iconTwo: '/img/common/dzno_icon.png',
                iconThree: '/img/common/dzyes_icon.png',
                message: 333,
                like: 333
            }
        ]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {

    },
    changeBtn(e) {
        console.log(e)
        let index = e.currentTarget.dataset.index
        this.setData({
            newsStatus: index
        })
    },
    checkLikeIcon(e) {
        console.log(e)
        console.log('==========likeStatus:' + this.likeStatus)
        let index = e.currentTarget.dataset.index
        console.log('=========e.dataset.index:' + index)
        this.setData({
            likeStatus: index
        })

    },
    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {

    }
})